package com.wenresearch.orion.demoapp;

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;

import com.wenresearch.orion.demoapp.screen.DefaultScreen;
import com.wenresearch.orion.demoapp.screen.MySplashScreen;

/**
 * Main application for demo
 * 
 * @author Ali Irawan (boylevantz@gmail.com)
 * @version 1.0
 */
public class MainApp extends UiApplication {

	public static void main(String[] args) {
		new MainApp().enterEventDispatcher();
	}

	public MainApp() {
		// Push splash screen
		pushScreen(new MySplashScreen(this, new DefaultScreen()));
	}

	/**
	 * Show message in dialog
	 * @param message message to be shown
	 */
	public static void showMessage(final String message) {
		UiApplication.getUiApplication().invokeLater(new Runnable() {
			public void run() {
				Dialog.inform(message);
			}
		});
	}

	
}
